package bridge.channel;

import bridge.mode.IPayMode;

import java.math.BigDecimal;

/**
 * @author : DuJiabao
 * @Date : 2021/3/3 10:56
 * @Project : design-pattern
 * @File : null.java
 * @Desc :
 */
public abstract class Pay {
  protected IPayMode payMode;

  public Pay(IPayMode payMode) {
    this.payMode = payMode;
  }

  public void setPayMode(IPayMode payMode) {
    this.payMode = payMode;
  }

  /**
   * 转账
   *
   * @param uId     用户ID
   * @param tradeId 目标用户ID
   * @param amount  数目
   * @return
   */
  public abstract boolean transfer(String uId, String tradeId, BigDecimal amount);
}
